package com.uneed.data;

import java.io.Serializable;

public abstract class ResultList<T extends Serializable> {
  protected String emptyMsg;
  protected boolean isEnd;
  protected T[] list;
  protected int nextStartIndex;
  protected int recordCount;
  protected int startIndex;

  public ResultList()
  {
  }

  public ResultList(int paramInt1, int paramInt2, int paramInt3, boolean paramBoolean, T[] paramArrayOfT)
  {
    this.recordCount = paramInt1;
    this.startIndex = paramInt2;
    this.nextStartIndex = paramInt3;
    this.isEnd = paramBoolean;
    this.list = paramArrayOfT;
  }

  public ResultList(int paramInt1, int paramInt2, boolean paramBoolean, T[] paramArrayOfT)
  {
    this.recordCount = paramInt1;
    this.startIndex = paramInt2;
    this.isEnd = paramBoolean;
    this.list = paramArrayOfT;
  }

/*  protected ResultList(Parcel paramParcel)
  {
    this.recordCount = paramParcel.readInt();
    this.startIndex = paramParcel.readInt();
    this.nextStartIndex = paramParcel.readInt();
    if (paramParcel.readInt() == i);
    while (true)
    {
      this.isEnd = i;
      this.emptyMsg = paramParcel.readString();
      return;
      i = 0;
    }
  }
*/
  public int describeContents()
  {
    return 0;
  }

  public String emptyMsg()
  {
    return this.emptyMsg;
  }

  public boolean isEnd()
  {
    return this.isEnd;
  }

  public T[] list()
  {
    return this.list;
  }

  public int nextStartIndex()
  {
    int j;
    int k =0;
    int i;
    if ((this.nextStartIndex == 0) && (!this.isEnd))
    {
      j = this.startIndex;
      if (this.list != null)
        k = this.list.length;
      i = k + j;
    } else {
    	i = this.nextStartIndex;
    }
    return i;
  }

  public int recordCount()
  {
    return this.recordCount;
  }

  public int startIndex()
  {
    return this.startIndex;
  }

  public String toString()
  {
    StringBuilder localStringBuilder1 = new StringBuilder();
    localStringBuilder1.append("result: ");
    localStringBuilder1.append("recordCount = ").append(this.recordCount);
    localStringBuilder1.append(", startIndex = ").append(this.startIndex);
    localStringBuilder1.append(", nextStartIndex = ").append(this.nextStartIndex);
    StringBuilder localStringBuilder2 = localStringBuilder1.append(", list = ");
    String str;
    if (this.list == null) {
    	str = "null";
    } else {
    	str = this.list.length + " objects";
    }
      localStringBuilder2.append(str);
      if (this.isEnd)
        localStringBuilder1.append(", EOF");
      return localStringBuilder1.toString();
  }
}
